package com.xms.core.enums;

import java.io.Serializable;

public enum OperationType implements Serializable {
    None(0, "none"),
    Create(1, "create"),
    Update(2, "update"),
    Delete(3, "delete"),
    Share(4, "share"),
    Assign(5, "assign"),
    Append(6, "append"),
    Merge(7, "merge");

    OperationType(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public boolean equals(OperationType compared){
        return this.value() == compared.value();
    }

    public int value() {
        return value;
    }

    public String text() {
        return name;
    }

    private int value;
    private String name;
}
